#ifndef _THREAD_H
#define _THREAD_H
#include<functional>
#include<atomic>
class Thread
{
  friend class ThreadPool;
public:
  using ThreadFunc = std::function<void(int)>;
  Thread(ThreadFunc func);
  ~Thread();
  void Start();
  int GetThreadId();
private:
  ThreadFunc func_;
  int threadId_;
static std::atomic_int generateId_;
};
#endif